<template>
    <div class="smallbox">
        <input type="text" placeholder="添加要做的事儿..." v-model="val">
        <div @click="post()"><img src="./未标题-2.jpg" alt="" class="pics" ></div>
    </div>
</template>
<script setup>
import {ref,defineProps, toRefs,defineEmits} from 'vue'
    let val = ref('')
    let emits = defineEmits(['add'])
    let post = function(){
        emits('add',val.value)
        val.value=''
    }




</script>
<style>
    .smallbox input {
    margin-right: 30px;
    width: 300px;
    height: 30px;
    font-size: 26px;
    border: 0;
    background-color: #f2f2f2;
    outline: none;
    border-bottom: 3px dashed rgb(7, 190, 246);
    margin-bottom: 30px;
}
</style>
